/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VolPro.Entity.SystemModels;

namespace VolPro.Entity.DomainModels
{
    [Entity(TableCnName = "作业批次",TableName = "productionbatches",DBServer = "SmesDbContext")]
    public partial class productionbatches:SmesEntity
    {
        /// <summary>
       ///主键，自增ID
       /// </summary>
       [Key]
       [Display(Name ="主键，自增ID")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int BatchID { get; set; }

       /// <summary>
       ///批次编码
       /// </summary>
       [Display(Name ="批次编码")]
       [MaxLength(64)]
       [Column(TypeName="nvarchar(64)")]
       [Editable(true)]
       public string BatchCode { get; set; }

       /// <summary>
       ///订单ID，外键关联生产订单表
       /// </summary>
       [Display(Name ="订单ID，外键关联生产订单表")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int OrderID { get; set; }

       /// <summary>
       ///产品ID，外键关联产品表
       /// </summary>
       [Display(Name ="产品ID，外键关联产品表")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int ProductID { get; set; }

       /// <summary>
       ///起始件号
       /// </summary>
       [Display(Name ="起始件号")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? StartPartNum { get; set; }

       /// <summary>
       ///投产数量
       /// </summary>
       [Display(Name ="投产数量")]
       [DisplayFormat(DataFormatString="18,2")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public decimal Quantity { get; set; }

       /// <summary>
       ///完工数量
       /// </summary>
       [Display(Name ="完工数量")]
       [DisplayFormat(DataFormatString="18,2")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public decimal FinishQuantity { get; set; }

       /// <summary>
       ///操作人员
       /// </summary>
       [Display(Name ="操作人员")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string Operators { get; set; }

       /// <summary>
       ///订单状态 -1作废0创建1执行2暂停3完成
       /// </summary>
       [Display(Name ="订单状态 -1作废0创建1执行2暂停3完成")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int Status { get; set; }

       /// <summary>
       ///旧的批次号
       /// </summary>
       [Display(Name ="旧的批次号")]
       [MaxLength(64)]
       [Column(TypeName="nvarchar(64)")]
       [Editable(true)]
       public string OldBatchCode { get; set; }

       /// <summary>
       ///开始时间，默认当前时间
       /// </summary>
       [Display(Name ="开始时间，默认当前时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public DateTime StartDate { get; set; }

       /// <summary>
       ///结束时间
       /// </summary>
       [Display(Name ="结束时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? EndDate { get; set; }

       /// <summary>
       ///备注
       /// </summary>
       [Display(Name ="备注")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       [Editable(true)]
       public string Memo { get; set; }

       /// <summary>
       ///移除作废的数量
       /// </summary>
       [Display(Name ="移除作废的数量")]
       [DisplayFormat(DataFormatString="18,2")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       public decimal? RemoveQuantity { get; set; }

       /// <summary>
       ///优先级
       /// </summary>
       [Display(Name ="优先级")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? Priority { get; set; }

       /// <summary>
       ///区域或产线名称
       /// </summary>
       [Display(Name ="区域或产线名称")]
       [MaxLength(64)]
       [Column(TypeName="nvarchar(64)")]
       [Editable(true)]
       public string AreaName { get; set; }

       
    }
}